home *** CD-ROM | disk | FTP | other *** search
/ Scene 96 / Scene 96 International Edition (Zyklop Software) (Disc 2) (1997).iso / misc / coding / e_os300b / wc_music / test.c < prev   
Encoding:
C/C++ Source or Header  |  1996-11-26  |  1.4 KB  |  40 lines

  1. //╔══════════════════════════════════════════════════════════════════════════╗
  2. //║                                                                          ║
  3. //║ This example show how to use Diamond Player with Watcom C                ║
  4. //║                                                                          ║
  5. //║                                                                          ║
  6. //║                                                                          ║
  7. //╚══════════════════════════════════════════════════════════════════════════╝
  8.  
  9. #include <stdio.h>
  10. #include <stdlib.h>
  11. #include <string.h>
  12. #include "..\resource\eos.h"
  13. #include <process.h>
  14.  
  15. void test_module()
  16. {
  17.    int  card=0,port=1,irq=2,dma=3,infos=4;
  18.    unsigned char  type=0;
  19.    unsigned char  position=1,pattern=2,note=3,volume=4,sfx_volume=5;
  20.    card=Detect_Sound_Card  (1,&port,&irq,&dma,&infos);
  21.    printf ("    ■ Card : %X Port : %X   Irq : %i   Dma : %i \n",card,port,irq,dma);
  22.    Load_Module ("..\\DATA\\TEST.MOD",0,44100,0);
  23.    Play_Module();
  24.    Change_Synchro_Int_08(70);
  25.     while ( !kbhit() )
  26.    {
  27.    Get_Info(&position,&pattern,¬e,&volume,&sfx_volume);
  28.    printf ("    ■ Position : %i Pattern : %i Note : %i Volume : %i  VBL : %i    \r",position,pattern,note,volume,Wait_Vbl());
  29.    }
  30.    printf ("\n");
  31.    Stop_Module();
  32.    Clear_Module();
  33. }
  34.  
  35. void main(int argn, char **argv)
  36. {
  37.    Init_EOS();
  38.    test_module();
  39.    exit (0);
  40. }